package com.itmeima.d6_singlelnstance;

public class B {
    private static B b;

    private B(){

    }

    public static B getInstance(){
        if(b == null){
            System.out.println("创建对象");
            b = new B();
        }
        return b;
    }
}
